﻿using System.ComponentModel.DataAnnotations;
using YFurion.Application;

namespace UpperComputer.Application
{
    public class BaseRoleDto : EntityDto
    {
        [Required(ErrorMessage = "角色编码不能为空"), RegularExpression(@"^[a-zA-Z]{1,50}$", ErrorMessage = "角色编码格式不正确")]
        public string Code { get; set; }

        [Required(ErrorMessage = "角色名称不能为空"), StringLength(50, ErrorMessage = "角色名称不能超过50个字符")]
        public string DisplayName { get; set; }

        [StringLength(255, ErrorMessage = "描述不能超过255个字符")]
        public string Description { get; set; }
    }
}
